<form id="pagerForm" method="post" action="">
	<input type="hidden" name="pageNum" value="{$pageNum}" />
	<input type="hidden" name="numPerPage" value="{$numPerPage}" />
	<input type="hidden" name="keywords" value="{$keywords}" />
	<input type="hidden" name="sfield" value="{$sfield}" />
	<input type="hidden" name="platform" value="SMW01" />
</form>
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="" method="post">
		<input type="hidden" name="m" value="{$module_name}" />
		<input type="hidden" name="a" value="{$action_name}" />
	<div class="searchBar">
		<ul class="searchContent">
			<li style="width:210px;">
				<label style="width:60px;">用户ID：</label>
				<input type="text" class="autoinput" name="userid" value="{$userid}" style="width:120px;"/>
			</li>
			<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
			<div class="buttonActive"><div class="buttonContent"><button type="button" onclick="navTab.reload();">刷新 </button></div></div>
		</ul>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="{:U('User/add_free')}"  target="dialog" width="510" height="350" rel="User_add_free"><span>添加免邮客户</span></a></li>
		</ul>
	</div>
	<div id="w_list_print">
	<table class="list" width="100%" targetType="navTab" layoutH="96">
		<thead>
			<tr>
				<th><input type="checkbox" group="freeids[]" class="checkboxCtrl"></th>
				<th>编号</th>
				<th>用户ID</th>
				<th>免邮类型</th>
				<th>免邮次数</th>
				<th>剩余次数</th>
				<th>有效开始时间</th>
				<th>有效结束时间</th>
				<th>创建时间</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
<volist name="list" id="vo">
			<tr target="sid_dv" rel="{$vo['id']}" >
				<td><input name="freeids[]" value="{$vo['id']}" type="checkbox"></td>
				<td>{$vo['id']}</td>
				<td>{$vo['userid']}</td>
				<td>{if $vo['type'] == 1 }次数{elseif $vo['type'] == 2 }时间{elseif $vo['type'] == 3 }次数和时间{elseif $vo['type'] == 4 }永久免邮{/if}</td>
				<td>{$vo['number']}</td>
				<td>{$vo['surplus_number']}</td>
				<td>{$vo['starttime']|date="Y-m-d",###}</td>
				<td>{$vo['endtime']|date="Y-m-d",###}</td>
				<td>{$vo['ctime']|date="Y-m-d H:i:s",###}</td>
				<td>{if $vo['state'] == 1}有效{else}无效{/if}</td>
				<td>
				{if $vo['state'] != 0}
				<a title="删除操作,请不要操作错了，该操作不可逆。" target="ajaxTodo" href="{:U('User/delete_free',array('id'=>$vo['id']))}" class="btnDel">操作</a>
				{/if}
				</td>
			</tr>
</volist>
		</tbody>
	</table>
	</div>
<include file="Index:pages" />
</div>